package com.erp.Utils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.Map;

public class getLoginUser {
    //获取当前登录的用户信息
    public static Map<String,Object> getSession(HttpServletRequest request){
        HttpSession session = request.getSession();
        Map<String,Object> map = new HashMap<>();
        map.put("userName",session.getAttribute("user"));
        map.put("userId",session.getAttribute("userId"));
        return map;
    }
}
